<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>左右两列布局</title>
    <style>
        .clearfix::after {
            content: "";
            display: table;
            clear: both;
        }
        .box {
            width: 600px;
            border: 2px solid #000;
        }
        .left {
            width: 200px;
            height: 200px;
            background-color: lightblue;
            float: left;
        }
        .right {
            width: 380px;
            height: 200px;
            background-color: lightgreen;
            float: right;
        }
    </style>
</head>
<body>
    <div class="box clearfix">
        <div class="left"></div>
        <div class="right"></div>
    </div>
</body>
</html>
